package com.zdlee.netty.server10.serialize;


import com.zdlee.netty.server10.serialize.impl.JSONSerializer;

/**
 * @author zdlee
 * @description: ${DESCRIPTION}
 * @create 2018-11-29 13:32
 */
public interface Serializer {

    Serializer DEFAULT=new JSONSerializer();

    /**
     * 序列化算法
     * @return
     */
    byte getSerializerAlgorithm();

    byte[] serialize(Object object);


    <T> T deserialize(Class<T> clazz, byte[] bytes);
}
